<extend name="Base/common"/>

<block name="header">
  <div class="ui-toolbar-wrap titleHead">
    <div class="ui-toolbar-left">
      <a href="javascript:window.history.back(-1);" class="button ui-btn ui-btn-icon-left" data-icon="arrow-l"><span class="ui-btn-text">返回</span><span class="ui-icon white ui-icon-arrow-l"></span></a>
    </div>
    <h2 class="ui-toolbar-title">{$meta_title}</h2>
    <div class="ui-toolbar-right">
      <a href="{:U('Receiver/add')}" class="button ui-btn"><span class="ui-btn-text">新增地址</span></a>
    </div>
  </div>
</block>

<block name="style">
	<link rel="stylesheet" type="text/css" href="__CSS__/app.receiver.css">
</block>
<block name="body">

<div class="receiver-add">
  <form action="{:U(update)}" method="post">
  	<ul>
  		<li>
        <input type="text" name="name" id="name" class="form-text" value="{$data['name']}" placeholder="收货人姓名" maxlength="20">
      </li>
  		<li>
        {:hook('areaSelect', array('province' => $data['province'], 'district' => $data['district'], 'city' => $data['city']))}
      </li>
      <li>
        <input type="text" name="address" id="address" class="form-text" value="{$data['address']}" placeholder="详细地址" maxlength="100">
      </li>
      <li>
        <input type="tel" name="mobile" id="mobile" class="form-text" value="{$data['mobile']}" placeholder="手机">
      </li>
    	<li>
        <input type="tel" name="phone" id="phone" class="form-text" value="{$data['phone']}" placeholder="电话">
      </li>
      <li>
        <input type="tel" name="zipcode" id="zipcode" class="form-text" value="{$data['zipcode']}" placeholder="邮编">
      </li>
    	<li id="isDefault">
        <p>
          <label>
            <span>是否设为常用地址</span>
            <input type="checkbox" name="is_default" class="setdefaultaddress" value="0">
          </label>
        </p>
      </li>
      <input type="hidden" name="id" value="{$data['id']}">
    	<li>
        <button type="submit" class="button ui-btn ui-btn-lg ui-btn-flex ui-btn-danger">保存</button>
      </li>
    </ul>
  </form>
</div>
</block>
<block name="script">
	<script src="__JS__/app/home.receiver.js"></script>
</block>